import request from '@/utils/request'

// 查询借书记录列表
export function listBorrowBooks(query) {
  return request({
    url: '/bookstore/borrowBooks/list',
    method: 'get',
    params: query
  })
}

// 查询借书记录详细
export function getBorrowBooks(id) {
  return request({
    url: '/bookstore/borrowBooks/' + id,
    method: 'get'
  })
}

// 新增借书记录
export function addBorrowBooks(data) {
  return request({
    url: '/bookstore/borrowBooks',
    method: 'post',
    data: data
  })
}

// 修改借书记录
export function updateBorrowBooks(data) {
  return request({
    url: '/bookstore/borrowBooks',
    method: 'put',
    data: data
  })
}

// 删除借书记录
export function delBorrowBooks(id) {
  return request({
    url: '/bookstore/borrowBooks/' + id,
    method: 'delete'
  })
}
